<template>
  <!-- 添加或修改菜单对话框 -->
  <!-- custom-class
       form 弹窗 默认必加--------------------------------------------------------
       dialogForm            =>  默认控制样式区域 管理部分公用样式
       form 弹窗 按布局格式添加 --------------------------------------------------
       dialogFormItemUDForm  =>  控制 form-item (label 、content) 上下布局样式 控制
       dialogFormItemLRForm  =>  控制 form-item (label 、content) 左右布局样式 控制
  -->
  <el-dialog v-loading="dialogFormLoading" :title="dialogFormTitle" custom-class="dialogForm dialogFormItemUDForm" :visible.sync="dialogFormVisibleBool" width="600px" :show-close="false">
    <el-form ref="dialogForm" :model="dialogForm" :class="dialogFormType==='view'?'formTable p-px-t-14':'p-px-t-4'" :label-width="dialogFormType==='view'?(4* 1.4 + 1.2 + 1.2 + 'rem' ):''">
      <el-row class="formRow" :gutter="dialogFormType==='view'?0:24">
        <el-col :span="24">
          <el-form-item label="操作模块">
            <span>{{ dialogForm.title }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="登录信息">
            <span>{{ dialogForm.operName }} / {{ dialogForm.operIp }} / {{ dialogForm.operLocation }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="请求地址">
            <span>{{ dialogForm.operUrl }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="请求方式">
            <span>{{ dialogForm.requestMethod }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="操作方法">
            <span>{{ dialogForm.method }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="请求参数">
            <span>{{ dialogForm.operParam }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="返回参数">
            <span>{{ dialogForm.jsonResult }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="操作状态">
            <span>{{ dialogForm.status === 0?'正常':'失败' }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="操作时间">
            <span>{{ parseTime(dialogForm.operTime) }}</span>
          </el-form-item>
        </el-col>
        <el-col v-if="dialogForm.status === 1" :span="24">
          <el-form-item label="异常信息">
            <span>{{ dialogForm.errorMsg }}</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogResetFormMixins">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
// 混入
import { dialogFormMixins } from '@/mixins/publicMixins/dialogFormMixins'
// -------------------------------------------------------------
export default {
  name: 'OperationdialogForm',
  mixins: [dialogFormMixins],
  data() {
    return {
      // 表单参数
      dialogForm: {
      }

    }
  },
  created() {
  },
  mounted() {
  },
  methods: {

    /**
     * @description: 详情回显
     * @Author: baoxuhui
     * @param {*} id
     * @return {*}
     */
    dialogDetailApi(res) {
      this.dialogForm = res
      this.dialogFormLoading = false
    }

  }
}
</script>
